package kr.ac.jejuuniv.controller;

import kr.ac.jejuuniv.service.UserService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/list")
public class UserList {
	@Autowired
	private UserService userService;

	@RequestMapping
	public ModelAndView action() {
		ModelAndView modelAndView = new ModelAndView();
		modelAndView.addObject("users", userService.list());
		return modelAndView;
	}
}
